
// 模块导入

// Slides Pages
// import { TabsPage } from '../pages/tabs/tabs';


// ionicModule(native)
import { StatusBar} from '@ionic-native/status-bar';
import { SplashScreen} from '@ionic-native/splash-screen';
import { IonicStorageModule } from '@ionic/storage';

import { Device } from '@ionic-native/device';
import { Keyboard } from '@ionic-native/keyboard';
import { Camera } from '@ionic-native/camera';
import { ImagePicker } from '@ionic-native/image-picker';
import { Geolocation } from '@ionic-native/geolocation';
import { Contacts } from '@ionic-native/contacts';

// Providers
import { StoreModule } from '@ngrx/store';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { AuthReducer } from '../providers/reducers/auth.reducer';
import { UserReducer } from '../providers/reducers/user.reducer';
import { ContactsReducer } from '../providers/reducers/contacts.reducer';
import { BorrowReducer } from '../providers/reducers/borrow.reducer';
import { OrdersReducer } from '../providers/reducers/orders.reducer';

// Providers(core)
import { UserService } from '../providers/core/user.service';
import { AuthService } from '../providers/core/auth.service';

// Providers(service)
import { BorrowService } from '../providers/service/borrow.service';
import { OrdersService } from '../providers/service/orders.service';

// Providers(util)
import { AlertService } from '../providers/utils/alert.service';
import { ToastService } from '../providers/utils/toast.service';
import { LoadingService } from '../providers/utils/loading.service';
import { ActionSheetService } from '../providers/utils/actionSheet.service';
import { HideBarsService } from '../providers/utils/hideBars.service';
import { GeolocationService } from '../providers/utils/geolocation.service';


// Ionic native providers
import { ContactsService } from '../providers/utils/contacts.service';

// Directives
import { BgColorDirective } from '../directives/bg-color';
import { KeyboardAttachDirective } from '../directives/keyboard-attach';

// Components
import { ImagesSelectedComponent } from '../components/images-selected/images-selected';
import { BackMoneyBriefComponent } from '../components/back-money-brief/back-money-brief';
import { OfficeAccordionComponent } from '../components/office-accordion/office-accordion';
import { BankEncryptionFooterComponent } from '../components/bank-encryption-footer/bank-encryption-footer';
import { OfficeCameraComponent } from '../components/office-camera/office-camera';
import { BoundBankCardComponent } from '../components/bound-bank-card/bound-bank-card';
import { BorrowPickerComponent } from '../components/borrow-picker/borrow-picker';
import { BorrowProgressComponent } from '../components/borrow-progress/borrow-progress';
import { ProgressListComponent } from '../components/progress-list/progress-list';


// Pipes
import { TelephonePipe } from '../pipes/telephone.pipes';
import { IdentityPipe } from '../pipes/identity.pipes';
import { BankPipe } from '../pipes/bank.pipes';
import { OrderByPipe } from '../pipes/orderBy.pipes';
import { SegmentPipe } from '../pipes/segment.pipes';


// Modules
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule } from '@angular/http';
import { MultiPickerModule } from 'ion-multi-picker';
import * as ionicGalleryModules from 'ionic-gallery-modal';
import { HAMMER_GESTURE_CONFIG } from '@angular/platform-browser';


export const Modules = [
  BrowserModule,
  HttpModule,
  MultiPickerModule,
  ionicGalleryModules.GalleryModalModule,
  IonicStorageModule.forRoot(),
  StoreModule.forRoot({
    auth: AuthReducer,
    user: UserReducer,
    borrow: BorrowReducer,
    contacts: ContactsReducer,
    orders: OrdersReducer,
  }),
  StoreDevtoolsModule.instrument()
];

export const Pages = [
  // Slides
  // TabsPage,

];

export const Pipes = [
  TelephonePipe,
  IdentityPipe,
  BankPipe,
  OrderByPipe,
  SegmentPipe,
];

export const Providers = [
  // Core Service
  {provide: 'user',  useClass: UserService},
  {provide: 'auth',  useClass: AuthService},
  {
    provide: HAMMER_GESTURE_CONFIG,
    useClass: ionicGalleryModules.GalleryModalHammerConfig,
  },

  // http Service
  BorrowService,
  OrdersService,

  // util Service
  AlertService,
  ToastService,
  LoadingService,
  ActionSheetService,
  HideBarsService,
  ContactsService,
  GeolocationService,

  // Ionic native specific providers
  StatusBar,
  SplashScreen,
  Device,
  Keyboard,
  Camera,
  ImagePicker,
  Geolocation,
  Contacts,
];

export const Components = [
  ImagesSelectedComponent,
  BackMoneyBriefComponent,
  OfficeAccordionComponent,
  BankEncryptionFooterComponent,
  OfficeCameraComponent,
  BoundBankCardComponent,
  BorrowPickerComponent,
  BorrowProgressComponent,
  ProgressListComponent,
];

export const Directives = [
  BgColorDirective,
  KeyboardAttachDirective,
];
